<?php
/**
 * Created by PhpStorm.
 * User: john
 * Date: 2017/7/6
 * Time: 09:58
 */
namespace App\Http\Controllers;
use Illuminate\Support\Facades\DB;
use App\Models\User;
class UserController extends Controller{
	public function index()
	{
//	    $select=DB::select('select * from ico_user where uin < ?',[10000]);
//	    $insert=DB::insert('insert into ico_user () valuse (),[]');
//		$update=DB::update('update ico_user set username="dai" where uin=5');
//		$delete=DB::delete('delete from ico_user where uin =?',[5]);
		
		$info=DB::table('user')->get();
		$oneInfo=DB::table('user')->where('uin','10300')->first();
		$oneInfo=DB::table('user')->where('uin','10300')->value('username');
//		$oneInfo=DB::table('ico_user')->pluck('uin','username');
//		DB::table('user')->orderBy('uin')->chunk(100, function ($users) {
//			foreach ($users as $user) {
//
//			}
//		});
		
		
		dd($oneInfo);

	}
	
	
	
}